- name: make the app be real
  hosts: os_masters_stg[0]:os_masters
  user: root
  gather_facts: False

  vars_files:
    - /srv/web/infra/ansible/vars/global.yml
    - "/srv/private/ansible/vars.yml"
    - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml

  roles:
  - role: openshift/project
    app: monitor-dashboard
    description: POC for the dashboards
    appowners:
    - cverna
    - pingou
    - asaleh
    - nphilipp
    - scoady
    - wwoods
    - siddharthvipul1

  - role: openshift/object
    app: monitor-dashboard
    template: configmap.yml
    objectname: configmap.yml


  - role: openshift/object
    app: monitor-dashboard
    file: notifiers.yaml
    objectname: notifiers.yml

  - role: openshift/object
    app: monitor-dashboard
    file: dashboard_provision_config.yml
    objectname: dashboard_provision_config.yml

  - role: openshift/object
    app: monitor-dashboard
    template: dashboard_config.yml
    objectname: dashboard_config.yml


  - role: openshift/object
    app: monitor-dashboard
    template: buildconfig.yml
    objectname: buildconfig.yml


  - role: openshift/object
    app: monitor-dashboard
    file: imagestream.yml
    objectname: imagestream.yml

  - role: openshift/object
    app: monitor-dashboard
    template: datagrepper_configmap.yml
    objectname: datagrepper_configmap.yml

  - role: openshift/object
    app: monitor-dashboard
    file: service.yml
    objectname: service.yml

  - role: openshift/object
    app: monitor-dashboard
    file: datagrepper_service.yml
    objectname: datagrepper_service.yml

  - role: openshift/object
    app: monitor-dashboard
    file: postgrest_service.yml
    objectname: postgrest_service.yml

  - role: openshift/object
    app: monitor-dashboard
    file: prest_service.yml
    objectname: prest_service.yml

  - role: openshift/object
    app: monitor-dashboard
    file: route_serviceaccount.yml
    objectname: route_serviceaccount.yml

# Route already present, will figure updating later
  - role: openshift/object
    app: monitor-dashboard
    file: route.yml
    objectname: route.yml

  - role: openshift/object
    app: monitor-dashboard
    file: datagrepper_route.yml
    objectname: datagrepper_route.yml

  - role: openshift/object
    app: monitor-dashboard
    file: postgrest_route.yml
    objectname: postgrest_route.yml

  - role: openshift/object
    app: monitor-dashboard
    file: prest_route.yml
    objectname: prest_route.yml

  - role: openshift/object
    app: monitor-dashboard
    template: postgrest_deploymentconfig.yml
    objectname: postgrest_deploymentconfig.yml

  - role: openshift/object
    app: monitor-dashboard
    template: prest_deploymentconfig.yml
    objectname: prest_deploymentconfig.yml


  - role: openshift/object
    app: monitor-dashboard
    template: datagrepper_deploymentconfig.yml
    objectname: datagrepper_deploymentconfig.yml

  - role: openshift/object
    app: monitor-dashboard
    template: deploymentconfig.yml
    objectname: deploymentconfig.yml
